import Vue from 'vue'
import Vuex from 'vuex'

import getters from './getters'
import mutations from './mutations'
import actions from './actions'
import {AUTHORITY_INIT_VALUE} from "./types";

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // adminname:"",
    // token:"",
    // role:null,
    // checkedkeys:[],

    // ...AUTHORITY_INIT_VALUE, //浅拷贝  -> 如果后期赋值可能会影响 checkedkeys:[],
    
    ...JSON.parse(JSON.stringify(AUTHORITY_INIT_VALUE)), //深拷贝  
  },
  getters: getters,
  mutations: mutations,
  actions: actions,
  modules: {
  }
})
